function getRootPath() {
	// 获取当前网址，如： http://localhost:8083/uimcardprj/share/meun.jsp
	var curWwwPath = window.document.location.href;
	// 获取主机地址之后的目录，如： uimcardprj/share/meun.jsp
	var pathName = window.document.location.pathname;
	var pos = curWwwPath.indexOf(pathName);
	// 获取主机地址，如： http://localhost:8083
	var localhostPaht = curWwwPath.substring(0, pos);
	// 获取带"/"的项目名，如：/uimcardprj
	var projectName = pathName
			.substring(0, pathName.substr(1).indexOf('/') + 1);
	return (localhostPaht + projectName);
}

// 加载检察院信息
function loadSysInfo() {
	$.post("LoadJcy", {}, function(data) {
		if (data.status == '获取信息成功') {
			$("#jcyNameFooter").html(data.jcyName);
			$("#jcyTelFooter").html(data.jcyTel);
			$("#jcyAddressFooter").html(data.jcyAddress);
		} else {
			alert(data.status);
		}
	}, "json");
	
}



// 加载下拉列表中的数据
function getAllCasePublishStatusData() {
    var data = [
                { "value" : "", "text" : "所有状态" },
                { "value" : "0", "text" : "未发布" },
                { "value" : "1", "text" : "已发布" }
    ];
    
    return data;
}

//加载下拉列表中的数据
function getAllCommentVerifyStatusData(){
	var data = [
	            {"value" : "", "text" : "所有状态"},
				{"value" : "0", "text" : "待审核"},
				{"value" : "1", "text" : "已通过"},
				{"value" : "-1", "text" : "未通过"}
	];
	
	return data;
}

function getAllCaseTitleData() {
	$.post("LoadAllCaseTitle", {}, function(data) {
		if (data.total > 0) {
			var titleData = [];
			titleData.push({"value" : 0, "text" : "所有案例"});
			for(var i = 0; i < data.total; i++) {
				titleData.push({"value" : data.rows[i].caseId, "text" : data.rows[i].caseName});
			}
			
			$("#commentPageForm_caseId").combobox({
				panelHeight : 245,
				data : titleData,
				value : $currentCaseId
			});
		}
	}, "json");
}
function getUrlParameter(key) {
	var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
	var url = window.location.href
	var r = window.location.search.substr(1).match(reg);
	if (r != null)
		return unescape(r[2]);
	
	return null;
}